﻿@model List<CinemaManagement.EF.Movie>
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";

}

<h2>已上架影片</h2>
<div>
    <section id="loginForm">
        @using (Html.BeginForm("Index", "Admin", FormMethod.Post))
        {
            <input type="text" name="name" placeholder="按名称筛选" class="form-control flex-nowrap" />
            <input type="text" name="type" placeholder="按标签筛选" class="form-control text-nowrap" />
            <input type="submit" value="查找" class="btn btn-primary" />
        }
    </section>
</div>

<button id="addMovieButton">Add Movie</button>

<div id="movieListContainer">
    <table class="table">
        <thead>
            <tr>
                <th>电影名称</th>
                <th>电影价格(元)</th>
                <th>电影类型</th>
                <th>主要演员</th>
                <th>电影时长</th>

            </tr>
        </thead>
        <tbody id="movieListBody">
            @foreach (var movie in ViewBag.movies)
            {
                <tr>
                    @*<td>@movie.movieId</td>*@
                    <td>@movie.movieName</td>
                    <td>@movie.moviePrice</td>
                    <td>@movie.movieType</td>
                    <td>@movie.movieActor</td>
                    <td>@movie.movieTime</td>
                    <td>
                        <a href="@Url.Action("Delete","Admin",new { id = movie.movieId })">下架</a>
                    </td>
                    @*<td>@movie.movieCreate</td>*@
                    @*<td>@movie.movieModified</td>*@
                </tr>
            }
        </tbody>
    </table>

</div>

